package com.qikux.entity;

import com.qikux.annotation.Column;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import java.time.LocalDate;


@Data
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder(toBuilder = true)
public class UserInfo extends Entity{

    private String photo;

    private LocalDate birth;

    @Column("nick_name")
    private String nickName;

    @Column("real_name")
    private String realName;

    private String sex;
    
    @Column("user_id")
    private Long userId;

    public String getSexDisplay(){
        if ("m".equalsIgnoreCase(this.sex)){
            return "男";
        }
        if ("f".equalsIgnoreCase(this.sex)){
            return "女";
        }
        return "保密";
    }
}
